package com.jch.demo.aop.xml;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestMain {

    public static void main(String[] args) {
        ApplicationContext atx = new ClassPathXmlApplicationContext("/beans/beans-demo-xml.xml");
        Calculator calculator = (Calculator) atx.getBean("calculator");
        int result = calculator.add(1,1);
        System.out.println(result);
        result = calculator.div(1,0);
        System.out.println(result);
    }

}
